package com.junxonline.plat;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * @ClassName: PlatApplication
 * @Description: 管理平台启动类
 * @author JunX
 */

@SpringBootApplication
@EnableCaching
@ComponentScan(basePackages = {"com.junxonline.*"})
@EnableJpaRepositories("com.junxonline.*.dao.repository")
@EntityScan("com.junxonline.*.dao.model")
@EnableScheduling
public class PlatApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(PlatApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(PlatApplication.class);
    }

}
